<template>
  <div>
    <h2>Hello</h2>
    <p>a - {{ a }}</p>
    <p>b - {{ b }}</p>
    <p>c - {{ c }}</p>
    <p>d - {{ d }}</p>
  </div>
</template>

<script>
import { inject } from 'vue'

export default {
  setup() {
    const a = inject('key1')
    const b = inject('key2')
    const c = inject('key3')
    const d = inject('key4', 'hello')
    console.log('a', a) // value1
    console.log('b', b) // value2

    return {
      a,
      b,
      c,
      d,
    }
  },
}
</script>
